
<!DOCTYPE html>
<html>


<!-- Mirrored from /theme/hplus/table_jqgrid.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:02 GMT -->
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>乡土味士-后台管理中心 - 农户中心</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

    <link rel="shortcut icon" href="favicon.ico">
    <link href="__PUBLIC__/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">

    <!-- jqgrid-->
    <link href="__PUBLIC__/css/plugins/jqgrid/ui.jqgridffe4.css?0820" rel="stylesheet">

    <link href="__PUBLIC__/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/css/style.min862f.css?v=4.1.0" rel="stylesheet">

    <!--选择搜索框样式文件-->
    <link href="__PUBLIC__/css/plugins/chosen/chosen.css" rel="stylesheet">
    <style>
        /* Additional style to fix warning dialog position */

        #alertmod_table_list_2 {
            top: 900px !important;
        }
    </style>

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>编辑农户</h5>
                </div>
                <div class="ibox-content">
                    <form method="post" class="form-horizontal">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">用户</label>
                            <div class="col-sm-10">
                                <div class="row">
                                    <div class="col-md-3">
                                        <select data-placeholder="选择用户" name="u_id" class="chosen-select form-control m-b" tabindex="2" style="width: 200px" disabled>
                                            <option value="0">未绑定</option>
                                            <volist name="list_member" id="vo">
                                                <option value="{$vo.id}" hassubinfo="true"  <?=$vo['id']==$u_id?'selected':''?>>
                                                {$vo.nickname}
                                                </option>
                                            </volist>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">地址-详细地址</label>
                            <if condition="getarea($a_id_1).getarea($a_id_2).getarea($a_id_3).getarea($a_id_4).getarea($a_id_5)">
                                <div class="col-sm-8">
                                    <input type="text" name="serve" placeholder="" value="<?=getarea($a_id_1).getarea($a_id_2).getarea($a_id_3).getarea($a_id_4).getarea($a_id_5)?>" class="form-control" disabled>
                                </div>
                            </if>
                            <div class="col-sm-8">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">(一级)省：</label>
                                    <div class="col-sm-5">
                                        <select class="form-control select-1" name="a_id_1">
                                            <option value="0">请选择</option>
                                            <volist name="areali" id="vo">
                                                <option value="{$vo.id}">{$vo.name}		编号:{$vo.area_id}（{$vo.id}）</option>
                                            </volist>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">(二级)市：</label>
                                    <div class="col-sm-5">
                                        <select class="form-control select-2" name="a_id_2">
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">(三级)区：</label>
                                    <div class="col-sm-5">
                                        <select class="form-control select-3" name="a_id_3">
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">(四级)街道：</label>
                                    <div class="col-sm-5">
                                        <select class="form-control select-4" name="a_id_4">
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">(五级)居委会/村：</label>
                                    <div class="col-sm-5">
                                        <select class="form-control select-5" name="a_id_5">
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">村庄：</label>
                                    <div class="col-sm-5">
                                        <input type="text" name="village" value="{$village}" placeholder="" class="form-control">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">产品种类</label>
                            <div class="col-sm-6">
                                <input type="text" name="info" placeholder="" value="{$info}" class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">品质承诺</label>
                            <div class="col-sm-6">
                                <input type="text" name="serve" placeholder="" value="{$serve}" class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button class="btn btn-primary" type="submit">添加</button>
                                <button class="btn btn-white" type="button" onclick="window.location.href='__MODULE__/Farmers/index'">取消</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<!--下拉搜索插件-->
<script src="__PUBLIC__/js/jquery.min.js?v=2.1.4"></script>
<script src="__PUBLIC__/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__PUBLIC__/js/content.min.js?v=1.0.0"></script>
<script src="__PUBLIC__/js/plugins/chosen/chosen.jquery.js"></script>
<script src="__PUBLIC__/js/plugins/jsKnob/jquery.knob.js"></script>
<script src="__PUBLIC__/js/plugins/jasny/jasny-bootstrap.min.js"></script>
<script src="__PUBLIC__/js/plugins/datapicker/bootstrap-datepicker.js"></script>
<script src="__PUBLIC__/js/plugins/prettyfile/bootstrap-prettyfile.js"></script>
<script src="__PUBLIC__/js/plugins/nouslider/jquery.nouislider.min.js"></script>
<script src="__PUBLIC__/js/plugins/switchery/switchery.js"></script>
<script src="__PUBLIC__/js/plugins/ionRangeSlider/ion.rangeSlider.min.js"></script>
<script src="__PUBLIC__/js/plugins/iCheck/icheck.min.js"></script>
<script src="__PUBLIC__/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="__PUBLIC__/js/plugins/colorpicker/bootstrap-colorpicker.min.js"></script>
<script src="__PUBLIC__/js/plugins/clockpicker/clockpicker.js"></script>
<script src="__PUBLIC__/js/plugins/cropper/cropper.min.js"></script>
<script src="__PUBLIC__/js/demo/form-advanced-demo.min.js"></script>

<!--五级地址联查-->
<script type="text/javascript">
    //一级
    $(".select-1").change(function(){

        //获取下一级所有地址
        $.ajax({
            type : "POST",
            dataType : "json",
            url: "__MODULE__/Area/getnext/rid/"+$(".select-1").val(),
            async:false,
            success: function(data){
                //展示下一级地区
                $(".select-2 option").remove();//移除所有option
                $(".select-3 option").remove();//移除所有option
                $(".select-4 option").remove();//移除所有option
                $(".select-5 option").remove();//移除所有option
                var instr="<option value='0'>请选择</option>";
                $(".select-3").append(instr);//添加新的option
                $(".select-4").append(instr);//添加新的option
                $(".select-5").append(instr);//添加新的option

                for(var i=0;i<data.length;i++){
                    instr+="<option value='"+data[i].id+"'>"+data[i].name+"		编号:"+data[i].area_id+"（"+data[i].id+"）"+"</option>";
                }//end for

                $(".select-2").append(instr);//添加新的option
            }
        });//end ajax
    });//end change
    //二级
    $(".select-2").change(function(){
        //获取下一级所有地址
        $.ajax({
            type : "POST",
            dataType : "json",
            url: "__MODULE__/Area/getnext/rid/"+$(".select-2").val(),
            async:false,
            success: function(data){
                //展示下一级地区
                $(".select-3 option").remove();//移除所有option
                $(".select-4 option").remove();//移除所有option
                $(".select-5 option").remove();//移除所有option
                var instr="<option value='0'>请选择</option>";
                $(".select-4").append(instr);//添加新的option
                $(".select-5").append(instr);//添加新的option

                for(var i=0;i<data.length;i++){
                    instr+="<option value='"+data[i].id+"'>"+data[i].name+"		编号:"+data[i].area_id+"（"+data[i].id+"）"+"</option>";
                }//end for

                $(".select-3").append(instr);//添加新的option
            }
        });//end ajax
    });//end change
    //三级
    $(".select-3").change(function(){
        //获取下一级所有地址
        $.ajax({
            type : "POST",
            dataType : "json",
            url: "__MODULE__/Area/getnext/rid/"+$(".select-3").val(),
            async:false,
            success: function(data){
                //展示下一级地区
                $(".select-4 option").remove();//移除所有option
                $(".select-5 option").remove();//移除所有option
                var instr="<option value='0'>请选择</option>";
                $(".select-5").append(instr);//添加新的option
                for(var i=0;i<data.length;i++){
                    instr+="<option value='"+data[i].id+"'>"+data[i].name+"		编号:"+data[i].area_id+"（"+data[i].id+"）"+"</option>";
                }//end for
                $(".select-4").append(instr);//添加新的option
            }
        });//end ajax
    });//end change
    //四级
    $(".select-4").change(function(){
        //获取下一级所有地址
        $.ajax({
            type : "POST",
            dataType : "json",
            url: "__MODULE__/Area/getnext/rid/"+$(".select-4").val(),
            async:false,
            success: function(data){
                //展示下一级地区
                var instr="<option value='0'>请选择</option>";
                for(var i=0;i<data.length;i++){
                    instr+="<option value='"+data[i].id+"'>"+data[i].name+"		编号:"+data[i].area_id+"（"+data[i].id+"）"+"</option>";
                }//end for
                $(".select-5 option").remove();//移除所有option
                $(".select-5").append(instr);//添加新的option
            }
        });//end ajax
    });//end change
    //五级
    $(".select-5").change(function(){
        //获取下一级所有地址
        $.ajax({
            type : "POST",
            dataType : "json",
            url: "__MODULE__/Area/getnext/rid/"+$(".select-5").val(),
            async:false,
            success: function(data){
                //展示下一级地区
                var instr="<option value='0'>请选择</option>";
                for(var i=0;i<data.length;i++){
                    instr+="<option value='"+data[i].id+"'>"+data[i].name+"		编号:"+data[i].area_id+"（"+data[i].id+"）"+"</option>";
                }//end for
                //$(".select-6 option").remove();//移除所有option
                //$(".select-6").append(instr);//添加新的option
            }
        });//end ajax
    });//end change
</script>
</body>

<!-- Mirrored from /theme/hplus/table_jqgrid.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:02 GMT -->
</html>